package com.yc.cloud.openai.portal.enums;

import java.util.Objects;

import lombok.Getter;

@Getter
public enum PrompOutputType {
    // 写实人物风格
    IMAGE("1", "图片"),
    VIDEO("2", "视频"),
    MODEL("3", "3D模型");

    private final String key;
    private final String value;

    PrompOutputType(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static PrompOutputType fromKey(String key) {
        for (PrompOutputType provider : PrompOutputType.values()) {
            if (Objects.equals(provider.getKey(), key)) {
                return provider;
            }
        }
        throw new IllegalArgumentException("Unknown key: " + key);
    }
}
